package com.region.dao;

import java.util.List;

import com.common.NomalHibernateDaoSupport;
import com.region.entity.Region;

public class RegionDaoImpl extends NomalHibernateDaoSupport implements IRegionDao {

	@Override
	public List<Region> findByParentId(Integer parentId) {
		return getHibernateTemplate().find("from Region r where r.parentId = ?",parentId);
	}

	@Override
	public List<Region> findByRegionType(Integer regionType) {
		return getHibernateTemplate().find("from Region r where r.regionType = ?",regionType);
	}
}
